#ifndef EVENT_H_
#define EVENT_H_

#include "Constants.h"

/**
 * Used for managing an event queue to handle sampled data from sensors. \n
 * An event consists of sampling sensor's name and sampled data. \n
 * Sensors names can be found in \ref Constants.h
 */
class Event {

public:

	sensors_names::ordinal m_sensor; // name of publishing sensor
	double m_data; // sensor's published data

	/**
	 * Constructor- sets sampling sensor and data for a new event
	 * @param sensor name of publishing sensor
	 * @param data sensor's published data
	 */
	Event(sensors_names::ordinal sensor, double data);

	/**
	 * Copy constructor- creates a new event according to given object
	 * @param source_event event to be copied
	 */
	Event(const Event& source_event);

	/**
	 * Assigns new values for event
	 * @param other event to assign
	 * @return the event after assignment
	 */
	Event& operator= (const Event& other);

	/**
	 * Compares two events. \n
	 * Event are equal if their sensor and sampled data are equal
	 * @param other event to be compared
	 * @return True if events are equal, False if not
	 */
	bool operator== (const Event& other) const;
};

#endif
